//
//  MMGProfileViewController.swift
//  MyMicroblog
//
//  Created by Mac on 17/1/4.
//  Copyright © 2017年 itcast. All rights reserved.
//

import UIKit

class MMGProfileViewController: MMGBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        // 添加右边设置项目
        navigationItem.rightBarButtonItem = UIBarButtonItem(title: "设置", style: UIBarButtonItemStyle.done, target: self, action: #selector(clickSetupItem))
        navigationItem.rightBarButtonItem?.setTitleTextAttributes([NSForegroundColorAttributeName:UIColor.black], for: UIControlState.normal)
        
        visitorView.updataInfo(imageName: "visitordiscover_image_profile", tipTitle: "登陆后,你的微薄,相册,个人资料会显示在这里,展示给他人", isHome: false)
//        setupUI()
    }
    
    
    func clickSetupItem() {
        
        
    }
    
    func setupUI() {
        
        // 添加 label, 提示用户登录
        let loginLabel:UILabel = UILabel(text: "登陆后,你的微薄,相册,个人资料会显示在这里,展示给他人", textColor: UIColor.lightGray, textFontSize: 15)
        loginLabel.textAlignment = NSTextAlignment.center
        loginLabel.center = self.view.center
        loginLabel.bounds.size = CGSize(width: 300, height: 50)
        loginLabel.numberOfLines = 0
        loginLabel.backgroundColor = UIColor.clear
        self.view.addSubview(loginLabel)
        
        // 添加大图片
        let mesImageView:UIImageView = UIImageView(imageName: "visitordiscover_image_profile", width: bigImageWH * 2, height: bigImageWH * 2)
        mesImageView.center = CGPoint(x: loginLabel.center.x, y: loginLabel.center.y - 100)
        self.view.addSubview(mesImageView)
        
        // 添加注册和登录按钮
        let registerButton:UIButton = UIButton(titleNormal:"注册", titleColorNormal:UIColor.orange, titleFontSize:17, backgroundImageNormal:"common_button_white",backgroundImageHight:"timeline_retweet_background_highlighted", frame:CGRect.zero)
        let loginButton:UIButton = UIButton(titleNormal:"登录", titleColorNormal:UIColor.black, titleFontSize:17, backgroundImageNormal:"common_button_white",backgroundImageHight:"timeline_retweet_background_highlighted", frame:CGRect.zero)
        
        registerButton.bounds.size = CGSize(width: 150, height: 40)
        loginButton.bounds.size = registerButton.bounds.size
        registerButton.center = CGPoint(x: 100, y: loginLabel.frame.maxY + 30)
        loginButton.center = CGPoint(x: UIScreen.main.bounds.width - 100, y: loginLabel.frame.maxY + 30)
        
        self.view.addSubview(registerButton)
        self.view.addSubview(loginButton)
    }
    

}
